package com.luban.hs.smo;

import com.luban.hs.dao.OfferDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author: hs
 * @Description:
 * @Date: Create in 17:41 2019/1/29
 */
@Component
public class OfferSmoImpl implements OfferSmo {
    /**
     * 根据编码查ID，代理接口
     *
     * @param offerNbr
     * @return
     */
    @Override
    public Long queryOfferIdByOfferNbr(String offerNbr) {
        System.out.println("执行业务逻辑...");
        return 1024L;
    }

    @Autowired
    OfferDao offerDao;

    @Override
    @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRES_NEW,timeout = 3)
    public void insertOfferTwo() {
        offerDao.insertOffer();
    }
}
